#include <QVariant>
#include <QVariantMap>
#include <QPair>
#include <QVector>

#pragma once
// namespace QYHHMap {
    /*
        Struct: QYHHMap::Coordinate
        坐标, 单位degree(度): QPair<latitude, longitude> *注意*: 纬度在前, 经度在后
    */
    typedef QPair<double, double> Coordinate;

    /*
        Struct: QYHHMap::CoordinateZoom
        坐标,缩放层级

        QPair<Coordinate, double>
    */
    typedef QPair<Coordinate, double> CoordinateZoom;



    /*
        Struct: QYHHMap::Coordinates
        QVector<Coordinate>
    */
    typedef QVector<Coordinate> Coordinates;

    /*
        Struct: QYHHMap::CoordinatesCollection
        QVector<Coordinates>
    */
    typedef QVector<Coordinates> CoordinatesCollection;

    /*
        Struct: QYHHMap::CoordinatesCollections
        QVector<CoordinatesCollection>
    */
    typedef QVector<CoordinatesCollection> CoordinatesCollections;

    /*
        Struct: QYHHMap::Feature
        图形
    */
   
    struct Feature {

        enum Type {
            PointType = 1, // 点
            LineStringType, // 线
            PolygonType // 面
        };
    
        Feature(Type type_ = PointType,
                const CoordinatesCollections &geometry_ = CoordinatesCollections(),
                const QVariantMap &properties_ = QVariantMap(),
                const QVariant &id_ = QVariant())
            : type(type_), geometry(geometry_), properties(properties_), id(id_) {
        }
        Type type;
        CoordinatesCollections geometry;
        QVariantMap properties;
        QVariant id;
    };
// } // namespace QYHHMap
